package com.zcp.week3.app;

import android.app.Application;
import android.os.Environment;

import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

import java.io.File;

/**
 * Created by Administrator on 2017/2/28.
 */

public class MyApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        File ff=new File(Environment.getExternalStorageDirectory().getPath()+"/ccc");
        ImageLoaderConfiguration configuration=new ImageLoaderConfiguration.Builder(this)
                .threadPriority(3)
                .threadPoolSize(4)
                .diskCache(new UnlimitedDiscCache(ff))
                .build();
        ImageLoader.getInstance().init(configuration);

    }
}
